package com.fpt.group3.dao;

import java.util.LinkedList;

import com.fpt.group3.form.TrustRegion;
import com.fpt.group3.service.exception.SystemException;

/**
 * interface for DAO region.
 * @author John Tran
 */
public interface TrustRegionDAO {

    /**
     * addTrustRegion.
     * @param tr trustregion
     * @return result success
     * @throws SystemException throws ex
     */
    boolean addTrustRegion(TrustRegion tr) throws SystemException;

    /**
     * amendTrustRegion.
     * @param tr trustregion
     * @return result success
     * @throws SystemException throws ex
     */
    boolean amendTrustRegion(TrustRegion tr) throws SystemException;

    /**
     * changTrustRegionStatus.
     * @param trID TrustRegionID
     * @param active status active or not
     * @return result success
     * @throws SystemException throws ex
     */
    boolean changTrustRegionStatus(int trID, int active) throws SystemException;

    /**
     * listTrustRegion.
     * @param isActive status active or not
     * @return list trustregion
     * @throws SystemException throws ex
     */
    LinkedList<TrustRegion> listTrustRegion(boolean isActive)
            throws SystemException;

    /**
     * get region id by name.
     * @param reName region name
     * @return region ID
     * @throws SystemException throws ex
     */
    int getRegionIdByName(String reName) throws SystemException;
}
